fix(sync): repair persisted Codex goal-context rows#874
Conversation
roborev: Combined Review (
|
|
This was probably fixed by #886, let me rebase this and see |
b7335d0 to
f1db0c0
Compare
f1db0c0 to
68ff8ab
Compare
roborev: Combined Review (
|
68ff8ab to
f1b131a
Compare
|
Addressed the RoboRev export finding in |
roborev: Combined Review (
|
Codex goal context records should be treated as archived system context instead of ordinary transcript content, otherwise legacy metadata can leak into transcript rendering and export/search surfaces. Keeping the parser classification explicit gives downstream filtering a stable boundary for hiding those rows without losing the archived messages. - fix(transcript): hide legacy Codex goal context rows - merge: sync with origin/main
The parser-level /goal classification already landed in 9bee8a3, so this branch should only carry the stale persisted-row repair path. Removing the repeated parser refactor and duplicate tests keeps the remaining diff focused on data-version resync and runtime filtering for legacy stored messages.
f1b131a to
5826ee7
Compare
|
Addressed the latest RoboRev goal-context consistency finding in |
roborev: Combined Review (
|
Codex goal-context parsing still matched source="goal" as a raw substring, so wrappers such as data-source="goal" were treated as synthetic goal continuations. A data-version reparse could therefore drop messages that the search and export filters correctly preserve. Match the source attribute with the same boundary semantics as the persisted-row matcher so only the real source="goal" attribute is suppressed.
roborev: Combined Review (
|
Refinement on top of #886 / 9bee8a3, which already taught the Codex parser to classify
/goalcontinuation envelopes as system content for newly parsed sessions.This PR handles the archive and compatibility side of that fix. It bumps the parser data version to 56 on top of main's version-55 Kimi usage-event bump, so existing source-backed Codex sessions are non-destructively re-parsed and old stored
/goalrows are removed from message lists and user-turn counts instead of remaining in persistent SQLite archives.It also adds read-path fallbacks for legacy rows that may still exist before reparse, or in rows that cannot be re-emitted from source files. Backend system-prefix filtering now uses a dedicated Codex goal-context predicate plus SQLite/PostgreSQL/DuckDB SQL variants, while frontend system-message detection and HTML/focused export use the same wrapper semantics. Both the current
<codex_internal_context ... source="goal">form, including extra attributes, and the older<goal_context>wrapper stay out of search, transcript filtering, and exported sessions.The main tradeoff is the data-version bump: multi-host PostgreSQL deployments should upgrade
pg serveand all pushers together, because older agentsview binaries reject rows written by a newer parser data version.